package cn.magictodo.weblog.admin.convert;

import cn.magictodo.weblog.admin.model.vo.article.FindArticleDetailRspVO;
import cn.magictodo.weblog.common.domain.dos.ArticleDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 将数据库 DO 类转换为 VO 视图类
 *
 * @author liu
 * @since 2023-11-24 23:18
 */
@Mapper
public interface ArticleDetailConvert {


        /**
         * 初始化 convert 实例
         */
        ArticleDetailConvert INSTANCE = Mappers.getMapper(ArticleDetailConvert.class);

        /**
         * 将 DO 转化为 VO
         * @param bean
         * @return
         */
        FindArticleDetailRspVO convertDO2VO(ArticleDO bean);
}

